﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Contact.aspx.cs" Inherits="ExpiredDomainSearch.FormContact" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
     <script type="text/javascript">
         function ValidateContactForm() {
             var isvalid = true;
             if (document.getElementById("<%=txtName.ClientID %>").value == "") {
                 isvalid = false;
             }
             else if (document.getElementById("<%=txtEmail.ClientID %>").value == "") {
                 isvalid = false;
             }
             else if (document.getElementById("<%=txtMessage.ClientID %>").value == "") {
                 isvalid = false;
             }

             if (!isvalid) {
                 alert('All fields are mandatory. Please fill your name, email and message!');
             }

             return isvalid;
         }
    </script>
    <div class="column4">
        <div class="title" style="float: left;">
            <div style="float: left;">
                Contact us for any queires</div>
            <span style="float: right;" id="searchText" runat="server"></span>
        </div>
        <table>
            <tr>
                <td>
                    <span>Name:</span>
                </td>
                <td style="width: 20px;">
                </td>
                <td>
                    <asp:TextBox ID="txtName" CssClass="form_input" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <span>Email:</span>
                </td>
                <td style="width: 20px;">
                </td>
                <td>
                    <asp:TextBox ID="txtEmail" CssClass="form_input" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <span>Message:</span>
                </td>
                <td style="width: 20px;">
                </td>
                <td>
                    <asp:TextBox ID="txtMessage" TextMode="MultiLine" CssClass="form_input" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td style="width: 20px;">
                </td>
                <td>
                    <asp:ImageButton ID="btnContact" style="float:right;" 
                        OnClientClick="return ValidateContactForm();" ImageUrl="~/images/contactus.gif" 
                                    runat="server" onclick="btnContact_Click"/>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
